package cn.yl.order.server.entity;

import cn.yl.api.server.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 用户课程订单表
 * </p>
 *
 * @author yl
 * @since 2022-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_course_order")
@ApiModel(value = "UserCourseOrder对象", description = "用户课程订单表")
public class UserCourseOrder  {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty("订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("课程id，根据订单中的课程类型来选择")
    @TableField("course_id")
    private Integer courseId;

    @ApiModelProperty("活动课程id")
    @TableField("activity_course_id")
    private Integer activityCourseId;

    @ApiModelProperty("订单来源类型: 1 用户下单购买 2 后台添加专栏")
    @TableField("source_type")
    private Integer sourceType;

    @ApiModelProperty("当前状态: 0已创建 10未支付 20已支付 30已取消 40已过期 ")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("是否删除")
    @TableField("code_url")
    private String codeUrl;


}
